package com.example.qt.ptplatform.service.impl;

import com.example.qt.ptplatform.mapper.TorrentReportMapper;
import com.example.qt.ptplatform.service.TrackerClientService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RequiredArgsConstructor
public class TrackerClientServiceImpl implements TrackerClientService {
    private final TorrentReportMapper torrentReportMapper;


    @Override
    public int getSeedersCount(String infoHash) {
        return torrentReportMapper.countCurrentSeeders(infoHash);
    }
}